package com.powernode.springboot.service;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class TestService {
    @Value("${myapp.name}")
    private String name;
    @Value("${myapp.email}")
    private String email;
    @Value("${myapp.age}")
    private int age;
    @Value("${myapp.sex}")
    private boolean sex;

    public void test() {
        System.out.println("name:" + name + ",email:" + email + ",age:" + age + ",sex:" + sex);
    }
}
